ImageGear Professional v18.2 > User Guide > Installing, Licensing, and Distributing ImageGear > ImageGear Licensing > Runtime Licensing > Automatically Reported Runtime (Node-Locked) > LDK vs. SLU > Licensing Development Kit (LDK) |
The Licensing Development Kit is an ActiveX component that may be used instead of the Server Licensing Utility (SLU). (Actually, the Server Licensing Utility is only a user interface for the Licensing Development Kit.) The Licensing Development Kit provides an interface for a developer to set the License Configuration File path and other properties as well as initiate requests to the licensing web service to generate license keys.
The AccuLicClient.DLL is located with the Server Licensing Utility (SLU). It is a 32-bit ActiveX/COM DLL that is used to execute runtime licensing activation functions. The bulk of the functionality provided by the Server Licensing Utility (SLU) is contained within the AccuLicClient.DLL and can be used within your own custom applications to achieve the same thing.
Unlike the Server Licensing Utility (SLU), the Licensing Development Kit allows for the optional assignment of Access Keys to specific users. By doing this, you can specify which of your licenses are assigned to your users. This also limits the distribution of licenses. When Runtime licenses are purchased, a list of Access Keys is distributed to you for this use.
This mode corresponds to the Automatic (Connected) Registration section described in the Server Licensing Utility (SLU) section. The process is shown in the C# sample code below:
Copy Code
|
|
---|---|
// Instantiate the LDK ActiveX component IDeploymentComponent ldk = new DeploymentComponent(); // Set the path to the configuration file provided // Attempt to get the next available license. if (ldk.ResultCode != enumLdkErrorCodes.LDK_SUCCESS) if (ldk.ResultCode == enumLdkErrorCodes.LDK_ERR_INET_CONN_BROKEN) |
The registration process is then complete. If any part of the registration process fails, a temporary license key is installed and is typically valid for 15 days. During this time, you are allowed to use the product while resolving any licensing related problems.
This mode corresponds to the Manual (Disconnected) Registration section described in the Server Licensing Utility (SLU) section. The process is shown in the C# code below:
Copy Code
|
|
---|---|
// Instantiate the LDK ActiveX component // Set the path to the configuration file provided // Get the hardware key for the system. Note // Write the hardware key to some type of removable media. ApplicationSpecificMethodToWriteHardwareKey(hardwareKey); |
At this point, you have the hardware key on some type of removable media. Take the media to a system that is connected to the Internet, acquire the license key by uploading the hardware key, write the new license key to the removable media, and then return to the disconnected system. The application then reads the license key from the removable media and installs the license key as shown below.
Copy Code
|
|
---|---|
// After taking the hardware key to a system with an Internet // Install the license key |
The manual license registration and installation is then complete. Like the automatic case above, if any error occurs during the setting of the license key, a temporary license is installed.
The Licensing Development Kit also has the ability to install an Evaluation License for purchased runtime products. This process is simply:
Copy Code
|
|
---|---|
// Instantiate the LDK ActiveX component // Set the path to the configuration file provided // Install an evaluation license |
The interface to the Licensing Development Kit is shown below:
Copy Code
|
|
---|---|
interface IDeploymentComponent : IDispatch { [propget, id(1)] HRESULT LicKey ( [out, retval] BSTR* pVal ); [propput, id(1)] HRESULT LicKey ( [in] BSTR newVal ); [propget, id(2)] HRESULT srvURL ( [out, retval] BSTR* pVal ); [propput, id(2)] HRESULT srvURL ( [in] BSTR newVal ); [propget, id(3)] HRESULT ConfigPath ( [out, retval] BSTR* pVal ); [propput, id(3)] HRESULT ConfigPath ( [in] BSTR newVal ); [propget, id(4)] HRESULT ResultString ( [out, retval] BSTR* pVal ); [propget, id(5)] HRESULT ResultCode ( [out, retval] enumLdkErrorCodes* pVal ); [id(6)] HRESULT GetLicKeyAuto ( [in] BSTR accKey ); [id(7)] HRESULT GetHdwKey ( [in] BSTR accKey , [out,retval] BSTR* hdwKey ); [id(8)] HRESULT StartEvalPeriod ( void ); [propget] HRESULT LicenseInfo ( [out, retval] BSTR* pVal ); [propput] HRESULT LicenseInfo ( [in] BSTR newVal ); [id(10)] HRESULT GetEvalPeriod ( [out, retval] long* pVal ); }; |